﻿import java.util.Scanner;

public class HomeWork {
	int year;
	int month;
	int day;
	
	public void sign(){
		if(month==1){
			if(day>19&&day<32){
				System.out.println("水瓶座");
			}else if(day>0&&day<20){
				System.out.println("摩羯座");
			}else{
				System.out.println("没有这个日期");
			}
		}else if(month==2){
			if(day>18&&day<29){
				System.out.println("双鱼座");
			}else if(day>0&&day<19){
				System.out.println("水瓶座");
			}else{
				System.out.println("没有这个日期");
			}
		}else if(month==3){
			if(day>20&&day<32){
				System.out.println("白羊座");
			}else if(day>0&&day<21){
				System.out.println("双鱼座");
			}else{
				System.out.println("没有这个日期");
			}
		}else if(month==4){
			if(day>19&&day<31){
				System.out.println("金牛座");
			}else if(day>0&&day<20){
				System.out.println("白羊座");
			}else{
				System.out.println("没有这个日期");
			}
		}else if(month==5){
			if(day>20&&day<32){
				System.out.println("双子座");
			}else if(day>0&&day<21){
				System.out.println("金牛座");
			}else{
				System.out.println("没有这个日期");
			}
		}else if(month==6){
			if(day>21&&day<31){
				System.out.println("巨蟹座");
			}else if(day>0&&day<22){
				System.out.println("双子座");
			}else{
				System.out.println("没有这个日期");
			}
		}else if(month==7){
			if(day>22&&day<32){
				System.out.println("狮子座");
			}else if(day>0&&day<23){
				System.out.println("巨蟹座");
			}else{
				System.out.println("没有这个日期");
			}
		}else if(month==8){
			if(day>22&&day<32){
				System.out.println("处女座");
			}else if(day>0&&day<23){
				System.out.println("狮子座");
			}else{
				System.out.println("没有这个日期");
			}
		}else if(month==9){
			if(day>22&&day<31){
				System.out.println("天秤座");
			}else if(day>0&&day<23){
				System.out.println("处女座");
			}else{
				System.out.println("没有这个日期");
			}
		}else if(month==10){
			if(day>23&&day<32){
				System.out.println("天蝎座");
			}else if(day>0&&day<24){
				System.out.println("天秤座");
			}else{
				System.out.println("没有这个日期");
			}
		}else if(month==11){
			if(day>22&&day<31){
				System.out.println("射手座");
			}else if(day>0&&day<23){
				System.out.println("天蝎座");
			}else{
				System.out.println("没有这个日期");
			}
		}else if(month==12){
			if(day>21&&day<32){
				System.out.println("摩羯座");
			}else if(day>0&&day<22){
				System.out.println("射手座");
			}else{
				System.out.println("没有这个日期");
			}
		}else{
			System.out.println("没有这个月份");
			}
	}
	
	public String zodiac(){
		int year = this.year - 1900; 
			if(year%12==0){
				return "鼠";}
			else if(year%12==1){
				return "牛";}
			else if(year%12==2){
				return "虎";}
			else if(year%12==3){
				return "兔";}
			else if(year%12==4){
				return "龙";}
			else if(year%12==5){
				return "蛇";}
			else if(year%12==6){
				return "马";}
			else if(year%12==7){
				return "羊";}
			else if(year%12==8){
				return "猴";}
			else if(year%12==9){
				return "鸡";}
			else if(year%12==10){
				return "狗";}
			else if(year%12==11){
				return "猪";}
			else{
				return "暂未更新1990年前数据！";
			}
	}
	
	public static void main(String[] args) {
		HomeWork date = new HomeWork();
		Scanner sc= new Scanner(System.in);
		System.out.print("请输入年份:");
		date.year = sc.nextInt();
		System.out.print("请输入月份:");
		date.month = sc.nextInt();
		System.out.print("请输入日期:");
		date.day = sc.nextInt();
		date.sign();
		if(date.year>=1900){
		System.out.println("属相：" + date.zodiac());
		}else{
			System.out.println(date.zodiac());
		}
	}
}
